package com.ozo.cloud.manage.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.ozo.cloud.common.database.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 部门
 * </p>
 *
 * @author qiangesoft
 * @since 2024-07-11
 */
@Getter
@Setter
@TableName("sys_dept")
public class SysDept extends BaseEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 上级id
     */
    private Long parentId;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 排序号
     */
    private Integer orderNum;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态：1-启用 0-禁用
     */
    private String status;

    /**
     * 逻辑删除
     */
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Boolean delFlag;

    /**
     * 逻辑删除
     */
    @TableField(exist = false)
    private List<SysDept> children = new ArrayList<>();
}
